package com.nnnu.wsnackshop.service;

import com.nnnu.wsnackshop.pojo.dto.AddStoreAddressDTO;
import com.nnnu.wsnackshop.pojo.dto.StoreAddressPageDTO;
import com.nnnu.wsnackshop.pojo.dto.UpdateStoreAddressDTO;
import com.nnnu.wsnackshop.pojo.entity.StoreAddresses;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nnnu.wsnackshop.pojo.vo.StoreAddressVO;
import com.nnnu.wsnackshop.result.PageResult;

import java.util.List;

/**
 * <p>
 * 门店地址表 服务类
 * </p>
 *
 * @author zk
 * @since 2025-05-19
 */
public interface IStoreAddressesService extends IService<StoreAddresses> {

    PageResult<StoreAddressVO> pageAddresses(StoreAddressPageDTO dto);

    List<StoreAddressVO> listByStore(Long storeId);

    void createAddress(AddStoreAddressDTO dto);

    void updateAddress(UpdateStoreAddressDTO dto);

    void deleteAddresses(List<Integer> ids);

    // 用户端新增方法
    StoreAddressVO getDefaultAddress(Long storeId);

    StoreAddressVO getAddressDetail(Long id);

    List<StoreAddressVO> batchGetAddresses(List<Long> ids);

    List<StoreAddressVO> searchAddresses(String keyword, Long storeId);
}
